package com.zzxx.mapper;

import com.zzxx.entity.ActivityContent;
import com.zzxx.entity.ActivityContentExample;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

public interface ActivityContentMapperEx {
    @SelectProvider(type=ActivityContentSqlProvider.class, method="selectByExample")
    @Results({
            @Result(column="id", property="id", jdbcType= JdbcType.VARCHAR, id=true),
            @Result(column="activityId", property="activityid", jdbcType=JdbcType.VARCHAR),
            @Result(column="userId", property="userid", jdbcType=JdbcType.VARCHAR),
            @Result(column="msg", property="msg", jdbcType=JdbcType.VARCHAR),
            @Result(column="likeNum", property="likenum", jdbcType=JdbcType.INTEGER),
            @Result(column="createTime", property="createtime", jdbcType=JdbcType.TIMESTAMP),
            @Result(column="userId", property="user", one = @One(select = "com.zzxx.mapper.UserMapper.selectByPrimaryKey"))
    })
    List<ActivityContent> selectByExample1(ActivityContentExample example);
}
